package org.auf.controllers;

import org.auf.core.Controller;
import org.auf.model.Event;
import org.auf.model.EventDAOJDBC;
import org.auf.model.IEventDAO;

public class ShowEventController extends Controller {

	@Override
	public void show() {
		//TODO: Pendiente de revision
		String id;
		id = (String) request.getAttribute("id");
		IEventDAO eventDAO = EventDAOJDBC.getInstance();
		Event actual = eventDAO.selectEvent(id);
		view.load("event");
		view.assignVar("geek", new Boolean(user.getGeek()).toString());
		view.assignVar("title",actual.getTitle());
		view.assignVar("description",actual.getDescription());
		view.assignVar("title",actual.getDateLimit());
		view.assignVar("owner",actual.getOwner());
		view.assignVar("geeksSlots",actual.getGeeksSlots());
		view.assignVar("volunteerSlots",actual.getVolunteersSlots());
		view.show();
	}
}
